<!DOCTYPE html>
<html>

<head>
    <meta content="telephone=no" name="format-detection">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="zh-CN">
    <meta http-equiv="x-ua-compatible" content="IE=edge, chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="关键词" />
    <meta name="description" content="页面简介" />
    <link rel="icon" href="favicon.ico" />
    <link rel="shortcut icon" href="favicon.ico" />
    <link href="csaa/css/style.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="./csaa/fonts/iconfont/iconfont.css">
    <link rel="stylesheet" href="./csaa/fonts/materialicons/material-icons.css">

    <script language="javascript" type="text/javascript" src="csaa/js/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="csaa/js/site.js"></script>
    <script src="csaa/js/httpPath.js"></script>
    <script src="csaa/js/httpUtils.js"></script>
    <title>全国青少年航空科学素质等级考试</title>
</head>

<body>
    <!-- 头部 开始 -->
    <div class="header">

    </div>
    <!-- 头部 结束 -->


    <!-- 内页banner 开始 -->
    <div class="in_banner ">
        <div class="in_banner_box " style="background-image: url(./demo/img/banner01.jpg) "></div>
        <div class="text ">搜索</div>
    </div>
    <!-- 内页banner 开始 -->

    <!-- 主体 开始 -->
    <div id="search_main ">
        <div class="main ">
            <div class="search_content ">
                <div class="list_news_wrap ">
                    <div class="search_title">考点动态共找到<span class="num">0</span>条</div>
                    <div class="list_news">

                    </div>
                </div>
                <div class="list_learn_wrap ">
                    <div class="search_title">学习中心共找到<span class="num">0</span>条</div>
                    <div class="list_learn">

                    </div>
                </div>
                <div class="list_level_wrap ">
                    <div class="search_title">等级相关共找到<span class="num">0</span>条</div>
                    <div class="list_level">

                    </div>
                </div>
            </div>




        </div>
        <!-- 动态模板 开始 -->
        <div id="tmp_item_news" style="display: none;">
            <div class="item">
                <div class="item_box">
                    <a class="img_wrap">
                        <div class="img" style="background-image: url()"></div>
                    </a>
                    <a class="text_wrap">
                        <div class="title">
                            <!-- <span class="badge badge_color_1"></span> -->
                            <span class="title_text"></span>
                        </div>
                        <div class="subtitle"></div>
                        <div class="time"></div>
                    </a>
                    <div class="manage_btnwrap">
                        <!-- <a class="btn btn_color_1 btn_down" href="" target="_blank"><i class="material-icons">&#xe2c4;</i></a> -->
                        <!-- <a class="btn btn_color_2 btn_link"  href=""><span>MORE</span></a> -->
                    </div>
                </div>
            </div>
        </div>
        <!-- 动态模板 结束 -->
        <!-- 学习列表模板 开始 -->
        <div id="tmp_item_learn" style="display: none;">
            <a class="item card">
                <div class="info_wrap ">
                    <div class="levelimg ">
                        <div class="text ">L1级</div><i class="icon material-icons "></i>
                        <div class="learn_state learning ">学习中</div>
                    </div>
                    <div class="levelinfo ">
                        <div class="title "> L1</div>
                        <div class="outline_wrap ">
                            <div class="label">大纲</div>
                            <div class="subtitle "></div>
                            <div class="manage_btnwrap ">
                                <div class="btn btn_color_2 btn_learn "><span>开始学习</span></div>
                            </div>
                        </div>
                    </div>
                </div>
            </a>
        </div>
        <!-- 学习列表模板 开始 -->
        <!-- 等级列表模板 开始 -->
        <div id="tmp_item_level" style="display: none;">
            <a class="item card" href="./about_info.html?id=9" style="display: block">
                <div class="item_wrap">
                    <div class="levelimg">
                        <div class="text">L1级</div><i class="icon material-icons"></i></div>
                    <div class="title">
                        <div class="title_text">全国青少年无人机科学素质等级考试标准</div>
                    </div>
                    <div class="subtitle">
                        <div class="label">大纲</div>
                        <div class="subtext"></div>
                    </div>
                    <div class="manage_btnwrap"></div>
                </div>
            </a>
        </div>
        <!-- 等级列表模板 开始 -->

        <!-- footer 开始-->
        <div class="footer_wrap ">
        </div>

        <script>
            fun_islogin(true); //页面头部登录

            getQueryString();
            var search_keyword = getQueryString('search');

            //载入搜索数据
            fun_load();

            if (!$(".list_news .item").length && !$(".list_learn .item").length && !$(".list_level .item").length) {
                $(".search_content").html("<div class=\"nothing\">什么也没搜到，要不换个词试试？？</div>")
            }


            function fun_load() {
                var tmp_parms = {
                    search: search_keyword,
                    pageSize: 10000,
                    pageNum: 1
                }

                $.ajax({ //载入新闻
                    type: "POST",
                    url: GET_NEWS_LIST,
                    dataType: 'json',
                    data: tmp_parms,
                    async: false,
                    timeout: 20000,
                    success: function(data, textStatus) {
                        if (typeof data != "object") {
                            data = data.$parseJSON(data)
                        }
                        var $tmp_html = $("<div/>");
                        var fetch_data = data.data;

                        if (data.status == 1) {
                            if (!fetch_data.length) {
                                $(".list_news_wrap ").hide();
                            }
                            for (var i = 0; i < fetch_data.length; i++) {

                                $(".list_news_wrap .search_title .num").text(fetch_data.length);

                                var $tmp_item = $("#tmp_item_news .item").clone();

                                $tmp_item.find(".img").css("background-image", "url(" + fetch_data[i].img + ")");
                                $tmp_item.find(".title .title_text").text(fetch_data[i].title);
                                $tmp_item.find(".subtitle").text(fetch_data[i].summary);

                                $tmp_item.find(".img_wrap").attr("href", "./news_info.html?id=" + fetch_data[i].id);
                                $tmp_item.find(".text_wrap").attr("href", "./news_info.html?id=" + fetch_data[i].id);

                                $tmp_html.append($tmp_item);

                            }
                            $tmp_html.find(".item").appendTo(".list_news_wrap .list_news");
                        }
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        $.fn.winktips("连接超时，请检查您的网络");
                    }
                });
                //载入学习
                $.ajax({
                    type: "POST",
                    url: GET_STUDY_CENTER_LIST,
                    dataType: 'json',
                    data: tmp_parms,
                    async: false,
                    timeout: 20000,
                    success: function(data, textStatus) {
                        if (typeof data != "object") {
                            data = data.$parseJSON(data)
                        }
                        var $tmp_html = $("<div/>");
                        var fetch_data = data.data;

                        if (data.status == 1) {
                            if (!fetch_data.length) {
                                $(".list_learn_wrap").hide();
                            }
                            for (var i = 0; i < fetch_data.length; i++) {

                                $(".list_learn_wrap .search_title .num").text(fetch_data.length);

                                var $tmp_item = $("#tmp_item_learn .item").clone();

                                $tmp_item.find(".text").text('L' + fetch_data[i].level + '级');
                                $tmp_item.find(".title").text(fetch_data[i].title);
                                $tmp_item.find(".subtitle").text(fetch_data[i].subtitle);

                                $tmp_item.attr("href", "./learn_info.html?id=" + fetch_data[i].id);

                                $tmp_html.append($tmp_item);

                            }
                            $tmp_html.find(".item").appendTo(".list_learn_wrap .list_learn");
                        }
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        $.fn.winktips("连接超时，请检查您的网络");
                    }
                });
                //载入等级相关
                $.ajax({
                    type: "POST",
                    url: GET_SET_UP_LIST,
                    dataType: 'json',
                    data: tmp_parms,
                    async: false,
                    timeout: 20000,
                    success: function(data, textStatus) {
                        if (typeof data != "object") {
                            data = data.$parseJSON(data)
                        }
                        var $tmp_html = $("<div/>");
                        var fetch_data = data.data;

                        if (data.status == 1) {
                            if (!fetch_data.length) {
                                $(".list_level_wrap ").hide();
                            }
                            for (var i = 0; i < fetch_data.length; i++) {

                                $(".list_level_wrap .search_title .num").text(fetch_data.length);

                                var $tmp_item = $("#tmp_item_level .item").clone();

                                $tmp_item.find(".text").text('L' + fetch_data[i].level + '级');
                                $tmp_item.find(".title .title_text").text(fetch_data[i].title);
                                $tmp_item.find(".subtitle .subtext").text(fetch_data[i].subtitle);

                                $tmp_item.attr("href", "./about_info.html?id=" + fetch_data[i].id);

                                $tmp_html.append($tmp_item);

                            }
                            $tmp_html.find(".item").appendTo(".list_level_wrap .list_level");
                        }
                    },
                    error: function(XMLHttpRequest, textStatus, errorThrown) {
                        $.fn.winktips("连接超时，请检查您的网络");
                    }
                });




            };

            // 载入最新动态
            //fun_news();
        </script>




        <!------------------------------------ 主体分割 -------------------------------->




    </div>
    <!-- 主体 结束 -->


</body>

</html>
